/*
 * @Author: your name
 * @Date: 2022-03-11 11:41:10
 * @LastEditTime: 2022-04-07 11:19:16
 * @LastEditors: Please set LastEditors
 * @FilePath: \VUE\app\src\main.js
 */
import Vue from 'vue'
import App from './App.vue'
//引入路由
import router from '@/router'


//引入iconfont
import icon from '../src/assets/icon/iconfont.css'
import icon2 from '../src/assets/icon2/iconfont.css'


//引入全局组件
import typeNav from '@/components/TypeNav'
import Carousel from '@/components/Carousel'
import Pagination from '@/components/Pagination'

//统一接收api下所有接口方法
import * as API from '@/api'
//使用全局组件
Vue.component(typeNav.name,typeNav)
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)


//引入store
import store from '@/store'

//yinrumock模拟数据轮播和热卖电器json数据
import '@/mock/mockServe'

//引入swiper样式
import 'swiper/css/swiper.css'


Vue.config.productionTip = false
new Vue({
  render: h => h(App),
  //全局事件总线$bus配置
  beforeCreate(){
    Vue.prototype.$bus = this,
    //挂载所有接口api再vue的原型上
    vue.prototype.$API = API
  },
  //注册路由：底下的写法KV一致省略V[router小写的]u
  router,
  store,
}).$mount('#app')
